package com.sscl.baselibrary.exts

import android.content.Context
import android.view.View
import android.view.inputmethod.InputMethodManager


/**
 * 隐藏输入法
 */
fun View.hideSoftInput() {
    val imm: InputMethodManager =
        context.getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
    imm.hideSoftInputFromWindow(windowToken, 0)
}